import {Axios, type AxiosResponse} from "axios";


export class OssResourceServer {
    private baseUrl:string = "https://snowcrystal-source-bkt.oss-cn-shanghai.aliyuncs.com/";
    private axiosInstance:Axios = new Axios(
        {
            baseURL:this.baseUrl,
            responseType:"blob"
        }
    );

    constructor() {}

    public async getOssResource(key:string):Promise<AxiosResponse> {
        return this.axiosInstance.get(key)
    }
}

export  const ossResourceServer =  new OssResourceServer();